<?php
defined ( 'SYSPATH' ) or die ( 'No direct script access.' );

class Controller_Opera extends Controller {
	
	public function before() {
		parent::before ();
	}
	
	public function after() {
		
		parent::after ();
	}
	
	public function action_index() {
		exit;
	}

    public function action_clearsmarty(){
    	$m = m::factory('smarty');
    	if ($_POST && isset($_POST['tpl'])){
    		if (isset($_POST['id'])){
    			if ($_POST['tpl'] == 'a.tpl')
    				$m->clearCache('index.tpl',md5($_POST['id']));
    			$r = $m->clearCache($_POST['tpl'],md5($_POST['id']));
    		}else{
    			$r = $m->clearCache($_POST['tpl']);
    		}
    	}else
    		$r = $m->clearAllCache();
        
        $ajax = new lib_ajax();
        $ajax->success('result:'.(string)$r)->json()->exec();
        exit;
    }
} // End Welcome
